// module.exports = function override(config, env) {
//     // do stuff with the webpack config...
//     return config;
// };

// const { override, fixBabelImports } = require('customize-cra');
const { override, fixBabelImports, addLessLoader } = require('customize-cra');
// const { darkTheme } = require('@ant-design/dark-theme');

module.exports = override(
    fixBabelImports('import', {
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: true,
    }),

    addLessLoader({
        javascriptEnabled: true,
        modifyVars: {
            '@primary-color': '#1890FF',
            '@text-color': 'rgba(255, 255, 255, 0.65)',
            '@layout-header-background': '#1F1F1F',
            '@component-background': '#141414',
            // '@layout-body-background': '#000000',
            '@border-color-base': '#BFBFBF',
            // '@body-background': '#FF0000',
            '@menu-dark-submenu-bg': '#000000',
            '@layout-body-background': '#000000',
        }, // 可以修改主题颜色，npm start
        // modifyVars: darkTheme,
    }),
);
